function editCart(cartItemId, buyCount) {
    window.location.href = "cart.do?operate=editCart&cartItemId=" + cartItemId + "&buyCount=" + buyCount;
}

function editCartMinus(cartItemId, buyCount) {
    if (buyCount <= 1) {
        alert("最小数量为1");
        return;
    }
    editCart(cartItemId, buyCount - 1);
}

function editCartAdd(cartItemId, buyCount, bookCount) {
    if (buyCount >= bookCount) {
        alert("超出库存最大数量");
        return;
    }
    editCart(cartItemId, buyCount + 1);
}